/**
 * Kalaisoo
 *
 * A lightweight no-framework framework written in PHP
 *
 * @package Kalaisoo
 * @author $Author: info@sah-company.com $
 */

/**
 * document.ready jquery stuff
 */
$(document).ready(function() {

	$('.child-add').click(function() {
		var responseElement = $(this).attr("data-model")+'-additional';
		var url = $(this).attr("href");
		$.post(url, function(data) {
	        $('#'+responseElement).prepend(data);
	    });
		return false;
	});

	$('.child-copy').click(function() {
		var responseElement = $(this).attr("data-model");
		var url = $(this).attr("href");
		$.post(url, function(data) {
	        $('#'+responseElement).replaceWith(data);
	    });
		return false;
	});

});